<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/page/common/taglibs.jsp" %>
<html>
<head>
    <script type="text/javascript" src="/static/My97DatePicker/WdatePicker.js"></script>
    <title>Title</title>
</head>
<body>
<form id="fm">
    考场名称:<input type="text" name="name"><br>
    参考人数:<input type="text" name="num"><br>
    上限人数:<input type="text" name="upper"><br>
    <input type="hidden" name="startTime">
    结束时间:<input type="text" name="endTime" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate" style="width:150px"/>


    <input type="button" value="添加" onclick="add()">
</form>
</body>
<script type="text/javascript">

    function add(){
        //加载
        var index = layer.load();
        $.post(
            "${ctx}/score/addScore",
            $("#fm").serialize(),
            function (result) {
                if(result.code !='200'){
                    layer.alert(result.msg,{icon: 5});
                }
                parent.location.href = "${ctx}/sco/toShow";
                //关闭
                layer.close(index);
            }
        );
    }
    //时间选择器
    laydate.render({
        elem: '#test5'
        ,type: 'datetime'
    });

</script>
</html>
